package ae.pcfc.cldos.online.common.clddb.domain.manager.provider;

import java.util.Date;

import ae.pcfc.cldos.online.common.clddb.dao.ReviewCommentsDAO;
import ae.pcfc.cldos.online.common.clddb.domain.ReviewComments;
import ae.pcfc.cldos.online.common.clddb.domain.manager.ReviewCommentsDOM;

/**
 * 
 * @author arosa
 *
 */
public class ReviewCommentsDOMImpl implements ReviewCommentsDOM {

	private ReviewCommentsDAO reviewCommentsDAO;
	
	public void setReviewCommentsDAO(ReviewCommentsDAO reviewCommentsDAO) {
		this.reviewCommentsDAO = reviewCommentsDAO;
	}
	
	public void add(ReviewComments reviewComments) {
		if(reviewComments!=null && reviewComments.getRcComments()!=null && 
				!reviewComments.getRcComments().trim().isEmpty()){
			reviewComments.setRcDate(new Date());
			reviewCommentsDAO.add(reviewComments);
		}
	}

	
}
